﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;

namespace MovingChame.WindowsStoreApp.CustomControl
{
    public class DraggableItemControl : Control
    {
        public DraggableItemControl()
        {
            this.DefaultStyleKey = typeof(DraggableItemControl);
        }

        protected override void OnPointerPressed(PointerRoutedEventArgs e)
        {
            VisualStateManager.GoToState(this, "Dragging", true);
        }

        protected override void OnPointerReleased(PointerRoutedEventArgs e)
        {
            VisualStateManager.GoToState(this, "NotDragging", true);
        }

        protected override void OnPointerMoved(PointerRoutedEventArgs e)
        {
        }
    }
}
